package com.wolfalpha.lwtool.map;

import java.util.ArrayList;
import java.util.List;

import com.wolfalpha.lwtool.vo.Job;
import com.wolfalpha.lwtool.vo.JobInfo;

/**
 * 共享数据
 * @author ttStudio
 *
 */
public class MapsAndLists {
	
	private static List<Job> jobs = new ArrayList<Job>();
	private static List<JobInfo> jobInfos = new ArrayList<JobInfo>();

	public static void addJob(Job mjob){
		jobs.add(mjob);
	}
	
	public static void removeJob(Job mjob){
		if(jobs.contains(mjob))
			jobs.remove(mjob);
	}
	
	public static List<Job> getJobs() {
		System.out.println("MapJobs.size = "+jobs.size());
		return jobs;
	}

	public  static void setJobs(List<Job> mjobs) {
		jobs = mjobs;
	}
	
	public static void setJobInfos(List<JobInfo> mjobInfos) {
		jobInfos = mjobInfos;
	}
	
	public static void addJobInfo(JobInfo mjob){
		jobInfos.add(mjob);
	}
	
	public static void removeJobInfo(JobInfo mjob){
		if(jobInfos.contains(mjob))
			jobInfos.remove(mjob);
	}
	
	public  static List<JobInfo> getJobInfos() {
		return jobInfos;
	}


}
